﻿@using Recaptcha
@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.ContactUs.ContactUsViewModel
@{
	ViewBag.Title = "Contact Us";
}


<div class="row">
	<div class="col-sm-12 col-md-12 col-lg-12">

		<!--left content block-->
		<div class="left_col_block">
			<div class="content_block_title">
				<h5>Contact Us</h5>
				<div class="title_bottom_arrow">
					<img src="@Url.Content("~/Content/images/down_arrow.png")" alt="" /></div>
			</div>

			<div class="biography_container">
				<h4 class="contact_title">SELF-MADE MILLIONAIRE ACADEMY INC
                                    <span class="designation">2917 MORTON LN<br>
										SMYRNA, TN 37167</span>
				</h4>

				<h4 class="contact_form_title">To contact us by e-mail, please fill out the form below. <span>All fields are required except for phone number</span></h4>

				<div class="row">
					<div class="contac_form col-lg-10">
						@using (Html.BeginForm())
						{

							@Html.ValidationSummary()

			                <div class="row">
                                <div class="col-sm-6  col-md-6 col-lg-6">
                                    <div class="form-group">
										@Html.LabelFor(m => m.Department, new { @class = "custom_label" })
										@Html.DropDownListFor(m => m.Department, Model.Departments, new { @class = "form-control" })
									</div>
                                </div>
                            </div>				
                            <div class="row">
								<div class="col-sm-6  col-md-6 col-lg-6">
									<div class="form-group">
										@Html.LabelFor(m => m.FirstName, new { @class = "custom_label" })
										@Html.TextBoxFor(m => m.FirstName, new { @class = "form-control", placeholder = "Enter your first name" })
									</div>

									<div class="form-group">
										@Html.LabelFor(m => m.Email, new { @class = "custom_label" })
										@Html.TextBoxFor(m => m.Email, new { @class = "form-control", placeholder = "Enter your email" })
									</div>
								</div>
								<div class="col-sm-6  col-md-6 col-lg-6">
									<div class="form-group">
										@Html.LabelFor(m => m.LastName, new { @class = "custom_label" })
										@Html.TextBoxFor(m => m.LastName, new { @class = "form-control", placeholder = "Enter your last name" })
									</div>

									<div class="form-group">
										@Html.LabelFor(m => m.Phone, new { @class = "custom_label" })
										@Html.TextBoxFor(m => m.Phone, new { @class = "form-control", placeholder = "Enter phone no (Optional)" })
									</div>
								</div>
							</div>
                                        
							<div class="form-group" width="100%">
								@Html.LabelFor(m => m.Comments, new { @class = "custom_label" })
								@Html.TextAreaFor(m => m.Comments, new { @class = "form-control",rows = 5, style="width: 100%;resize: vertical; min-height: 100px; max-height:500px;" })
							</div>
                                        
							<div class="form-group">		
								@Html.Raw(Html.GenerateCaptcha())
							</div>
                                        
							<div class="form-group">
								<div class="">
									<button type="submit" class="btn btn-primary">Send</button>
								</div>
							</div>
                                    
		                    
                            if ((Model != null) && (!string.IsNullOrEmpty(Model.SendStatusMessage)))
					        {
                        
							<div class="modal fade" id="success-dialog" tabindex="-1" role="dialog" aria-labelledby="add-dialog-label" aria-hidden="true">
								<div class="modal-dialog">
									<div class="modal-content">

										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
											<h4 class="modal-title" id="success-dialog-label">Message</h4>
										</div>
										<div class="modal-body">
											@Html.Raw(Model.SendStatusMessage)
										</div>
										<div class="modal-footer">
											<div class="row">
												<div class="col-sm-12">
													<div class="pull-right">
														<a href="#" class="btn btn-default width80" data-dismiss="modal">OK</a>
													</div>
												</div>
											</div>

										</div>
										<!-- /.modal-content -->
									</div>
									<!-- /.modal-dialog -->
								</div>
							</div>
							<script type="text/javascript">
							    $(function () {
							        $("#success-dialog").modal();
							        $("input[type='text']").val('');
							    });
							</script>
                      
                            }
						}
					</div>
				</div>


			</div>

		</div>
	</div>
</div>

<script type="text/javascript">
	$(function () {

		if (isIE) {
			$("textarea").resizable({maxWidth: $("textarea").width(), minWidth: $("textarea").width(), minHeight: "100", maxHeight: "500"});
			//$("#@Html.IdFor(m=>m.Comments)").height(200);

		}

		function isIE() {
			var isIE11 = navigator.userAgent.indexOf(".NET CLR") > -1;
			var isIE11orLess = isIE11 || navigator.appVersion.indexOf("MSIE") != -1;
			return isIE11orLess;
		}
	});


</script>
